<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=open(" 2.html?id=" + lli[index].getAttribute(" idx")), initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="../css/reset.css">
    <link rel="stylesheet" href="../css/public.css">
    <link rel="stylesheet" href="../css/1.css">
    <style>
        .div1 {
            width: 1190px;
            margin: 0 auto;
        }

        .ima1 {
            float: left;
            width: 410px;
            height: 410px;
        }

        .le {
            float: left;
            width: 420px;
            box-sizing: border-box;
            padding: 0 30px;
        }

        .line {
            height: 8px;
            border: none;
            background: url(../images/hrgif.gif) repeat;
            width: 420px;
            display: inline-block;
        }

        .ima2 {
            width: 50px;
            height: 50px;
            display: inline-block;
        }

        .lef {
            display: inline-block;
        }

        .name {
            color: #333;
            font-size: 18px;
        }

        .time {
            color: #999;
            font-size: 12px;
        }

        .title {
            height: 108px;
            overflow: hidden;
            word-wrap: break-word;
            word-break: break-all;
            margin-bottom: 20px;
            color: #666;
            font-size: 14px;
        }

        .title1 {
            margin-bottom: 15px;
            line-height: 1;
            font-weight: 400;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .buy {
            margin-bottom: 15px;
        }

        .buy a {
            padding: 0 15px;
            height: 38px;
            line-height: 38px;
            border: 1px solid #000;
            border-radius: 2px;
            color: #000;
            font-size: 16px;
            display: inline-block;
        }

        .buy span {
            line-height: 38px;
            color: #000;
            font-size: 16px;
            font-weight: bold;
        }

        .box2 {
            margin: 0 15px;
            height: 42px;
            line-height: 42px;
            border-top: 1px dotted #ededed;
            text-align: center;
        }
    </style>
</head>

<body>
    <div id="top">
        <div class="top_m">
            <ul class="top_ml">
                <li>
                    <div class="top_mll">
                        <a href="#" class="qing">亲，请登录</a>
                        <a href="#" class="mianfei">免费登录</a>
                    </div>

                </li>
                <li><a href="#" class="shouji">手机逛淘宝</a></li>
            </ul>
        </div>

        <div class="banner">
            <hr>
            <a href="#">
                <p class="jie">爱逛街</p>
                <p class="wang">guang.taobao.com</p>
            </a>
        </div>

        <div class="box"></div>

        <script src="../js/1.js"></script>
        <script>
            let box = document.querySelector(".box")


            let a = location.search;
            // console.log(a)
            a = a.substring(1);
            a = a.split("=");
            let obj1 = {};
            obj1[a[0]] = a[1];
            let idx1 = arr.filter((items, index) => {
                return items.id == obj1.id
            })
            let div1 = document.createElement("div")
            div1.classList.add("div1")
            arr.forEach((item, index) => {
                if (item.id == obj1.id) {

                    div1.innerHTML = `  <img src="` + item.img + `" alt="" class="ima1">
                    <div class="le"> 
                        <hr class="line">
                        <img src="` + item.images + `" alt="" class="ima2">
                        <div class="lef">
                    <p class="name">`+ item.name + `</p>
                            <p class="time">`+ item.time + `</p>
                    </div>
   
                    <p  class="title">` + item.title + `</p>
                    <div class="box2"></div>
                        <p  class="title1">` + item.title + `</p>


            <p class="buy"><a href="#">去购买<span>`+ item.price + `<span></a></p>
           <div class="box2"></div>
        </div>`
                }
            })

            box.appendChild(div1)
        </script>
</body>

</html>